package com.zhangyang.dubbo.dal.impl;

import com.zhangyang.dubbo.dal.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * Created by ASUS on 2017/9/12.
 */
@Repository(value = "userDao")
public class UserDaoImpl implements UserDao {

    @Autowired
    JdbcTemplate userJdbcTemplate;
    /**
     * 更新余款
     * @param money
     */
    public void debet(int money,String userName,int id) {
        /**
         * 更新对应的数据
         */
        userJdbcTemplate.update("UPDATE debet SET money=? where userName=? and id=?;",money,userName,id);
    }
}
